﻿using System.Windows;

namespace Xioa_UI.Service;

public static class WindowSizeSetting
{
    /// <summary>
    /// Setting All Screen Size Not Include Border
    /// </summary>
    /// <param name="window"></param>
    public static void SettingHeightWidthAdaptationScreenPrimary(this Window window)
    {
        window.MaxHeight = SystemParameters.MaximizedPrimaryScreenHeight;
        window.MaxWidth = SystemParameters.MaximizedPrimaryScreenWidth;
    }
    
    /// <summary>
    /// Setting Working Size Not Include Border
    /// </summary>
    /// <param name="window"></param>
    public static void SettingHeightWidthAdaptationScreenWorkArea(this Window window)
    {
        window.MaxHeight = SystemParameters.WorkArea.Height;
        window.MaxWidth  = SystemParameters.WorkArea.Width;
    }
    
    /// <summary>
    /// Setting All Screen Size Include Border
    /// </summary>
    /// <param name="window"></param>
    public static void SettingHeightWidthAdaptationScreenPrimaryScreen(this Window window)
    {
        window.MaxHeight = SystemParameters.PrimaryScreenHeight;
        window.MaxWidth  = SystemParameters.PrimaryScreenWidth;
    }

    /// <summary>
    /// Setting Full Screen Size Include Screen Bottom 
    /// </summary>
    /// <param name="window"></param>
    public static void SettingWindowFullScreen(this Window window)
    {
        window.WindowState = System.Windows.WindowState.Maximized;
        window.WindowStyle = System.Windows.WindowStyle.None;
        window.ResizeMode = System.Windows.ResizeMode.NoResize;
        window.Topmost = true;
        window.Left = 0.0;
        window.Top = 0.0;
        window.Width = System.Windows.SystemParameters.PrimaryScreenWidth;
        window.Height = System.Windows.SystemParameters.PrimaryScreenHeight;
    }
    
}